<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/AppStore/Public/boot/css/bootstrap.min.css">
    <script src="/AppStore/Public/boot/js/jquery.min.js"type="text/javascript"/>
    <script src="/AppStore/Public/boot/js/bootstrap.js" type="text/javascript"></script>
    <title></title>
</head>
<body>
<h1>用户管理界面</h1>
<table id="users" class="table table-striped table-bordered dataTable">
    <thead>
    <tr>
        <td>头像</td>
        <td>用户名</td>
        <td>真实姓名</td>
        <td>邮箱</td>
        <td>电话</td>
        <td>状态</td>
        <td>审核信息</td>
        <td>明星作者</td>
        <td>首页推荐</td>
        <td>操作</td>

    </tr>
    </thead>
    <tbody>
    <?php if(is_array($users)): $i = 0; $__LIST__ = $users;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
            <td><img src="/AppStore/Public/Uploads/photo/<?php echo ($vo["photo"]); ?>" width="100px"height="100px"></td>
            <!--_public_自动对应文件夹-->
            <td><?php echo ($vo["username"]); ?></td>
            <!--<?php echo ($vo['username']); ?>-->
            <td><?php echo ($vo["realname"]); ?></td>
            <td><?php echo ($vo["email"]); ?></td>
            <td><?php echo ($vo["tele"]); ?></td>
            <td>
                <?php if($vo["state"] == 0): ?>禁用
                    <?php elseif($vo["state"] == 1): ?>普通
                    <?php else: ?>禁言<?php endif; ?>
            </td>
            <td><?php echo ($vo["verifyinfo"]); ?></td>
            <td>
                <?php if($vo["isstar"] == 0): ?>否
                    <?php else: ?>是<?php endif; ?>
            </td>
            <td>
                <?php if($vo["isfirst"] == 0): ?>否
                    <?php else: ?> 是<?php endif; ?>
            </td>
            <td>
                <div class="btn-group">
                    <a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">
                        操作
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu pull-right">
                        <li><a href="updateuserInfo?id=<?php echo ($vo["id"]); ?>"><i class="icon-envelope"></i>修改</a></li>
                        <li><a href="del?id=<?php echo ($vo["id"]); ?>"><i class="icon-edit"></i>删除</a></li>
                        <li><span class="glyphicon glyphicon-thumbs-down"></span>
                            <?php if($vo["isstar"] == 0): ?><a href="setstar?id=<?php echo ($vo["id"]); ?>">设置明星作者</a>
                                <?php else: ?>
                                <a href="unstar?id=<?php echo ($vo["id"]); ?>">取消明星作者</a><?php endif; ?>
                        </li>
                        <li><span class="glyphicon glyphicon-star-empty"></span>
                            <?php if($vo["isfirst"] == 0): ?><a href="setfirst?id=<?php echo ($vo["id"]); ?>">设置首页推荐</a>
                                <?php else: ?>
                                <a href="unfirst?id=<?php echo ($vo["id"]); ?>">取消首页推荐</a><?php endif; ?></li>
                        <li><a href="#"><span class="glyphicon glyphicon-remove-sign"></span>
                            <?php if($vo["state"] == 0): ?>取消禁用
                                <?php elseif($vo["state"] != 0 ): ?>禁用
                                <?php elseif($vo["state"] ): ?>禁言<?php endif; ?>
                        </a></li>
                    </ul>
                </div>
            </td>
        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
    </tbody>
</table>
<div class="pageination"><?php echo ($page); ?></div>
</body>
</html>